<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        form {
            width: 200px;
            border: 1px solid black;
            padding: 10px
        }
    </style>
</head>

<body>
    <h2>用户登录</h2>
    <form action="/mylogin" method="post">
        用户：<input type="text" value="" name="username" placeholder="用户" autocomplete="off">
        <br />
        密码：<input type="password" value="" name="password">
        <br>
        邮箱：<input type="text" value="" name="email" autocomplete="off">
        <br>
        手机：<input type="password" value="" name="phone" autocomplete="off">
        <input type="submit"></input>
    </form>


    <script>

        var pattern = /1[3-9]\d{9}/

        var str = prompt('输入')
        if (pattern.test(str)) {
            console.log('可以使用');
        } else {
            console.log('不能使用');
        }

    </script>
</body>

</html>